package com.tsy.server.system.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 修改密码请求参数
 */
@Data
@ApiModel(value = "修改密码请求参数", description = "用户修改密码时需要提交的信息")
public class UpdatePasswordDTO {

    /**
     * 旧密码
     */
    @ApiModelProperty(value = "旧密码", required = true, example = "123456")
    @NotBlank(message = "旧密码不能为空")
    private String oldPassword;

    /**
     * 新密码
     */
    @ApiModelProperty(value = "新密码", required = true, example = "654321", notes = "密码长度必须在6-20个字符之间")
    @NotBlank(message = "新密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20个字符之间")
    private String newPassword;

    /**
     * 确认新密码
     */
    @ApiModelProperty(value = "确认新密码", required = true, example = "654321", notes = "必须与新密码一致")
    @NotBlank(message = "确认新密码不能为空")
    private String confirmNewPassword;
}